package com.wangtongxiao.beans;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.lang.NonNull;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Value {
    String id;
    @NotNull(message = "字典数值不能为null")
    @NotEmpty(message = "字典类型不能为空字符串")
    String value;
    String text;

    @Min(value = 1, message = "最小值为1")
    @Max(value = 9999999, message = "数值最大为9999999")
    int orderNo;
    String typeCode;
    Type dictionaryType;

}
